In a conventional routing technology, if there is an application scenario where multiple different paths reach the same destination address, data packets sent to the destination address can only use one of the multiple paths, and the other paths are in a backup state or an invalid state. Thus, path resources are idle and wasted. Even in a dynamical routing environment, mutual switching also requires some time.
By means of an Equal-Cost Multipath (ECMP) technology, layer 3 forwarding traffic sent to the same IP or the same destination network segment is shared through different paths, thereby realizing the load balancing of a network.
Traffic is generally classified based on a manner of stream in ECMP, and a hash method is usually used for selecting a path. In the ECMP technology of the related art, after a certain path is failed, it is required to hash again, so that the traffic is normally allocated on all normal paths. This processing method would thoroughly disrupt the traffic of all paths, and then reallocate it, thereby influencing the efficiency of traffic allocation and a subsequent traffic recovery process.